package cn.blog.bizbase;

import cn.blog.bizbase.common.ResultInfo;
import cn.blog.entity.UserEntity;
import cn.blog.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by mk on 2018/4/13/013.
 */
@RestController
@RequestMapping(value = "/sysconfig")
public class IndexController {
    @Autowired
    UserMapper userMapper;
    @RequestMapping(value = "/index")
    public ResultInfo getTopMenu(HttpRequest request,
                                 @RequestParam String account){

        ResultInfo resultInfo = new ResultInfo(true);
        List<UserEntity> users = userMapper.getAll();
        resultInfo.setData("users",users);
        resultInfo.addData("test","1");
        return resultInfo;
    }
}
